package com.baseLesson.reflect.mapperDemoClass;

import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;

/**
 * job 拿到mapper的字节码Class 做的操作
 */
public class Test {

    public static void main(String[] args)throws  Exception {

        Class<MyMapper> myMapperClass = MyMapper.class;

        MyMapper myMapper = myMapperClass.newInstance();

        LongWritable key = new LongWritable(0);
        Text value = new Text("hadoop welcome hadoop");

        myMapper.map(key,value );

        System.out.println("---------------------");

        Class<YourMapper> yourMapperClass = YourMapper.class;

        YourMapper yourMapper = yourMapperClass.newInstance();

        LongWritable key1 = new LongWritable(0);
        Text value1 = new Text("hadoop,hdfs,welcome");

        yourMapper.map(key1,value1);


    }

}
